'use strict';

import React from 'react';
import {
    StyleSheet,
    ScrollView,
    Image,
    TextInput,
    TouchableWithoutFeedback,
    TouchableHighlight,
    Text,
    View
} from 'react-native';
import ImageUpload from './uploadImage.js';

const Model=[
    {
        id:0,
        bigItem:'通用重点问题',
        bigItemStatus:'hidden',
        smallItem:[
            {itemId:0,itemTitle:'A1 健康证：员工健康证齐全有效；建有员工健康证台账', smallItemStatus:'hidden',
             itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'4分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'3分',itemScoreStatus:'hidden'},
                        {itemScoreId:3,itemScoreTitle:'2分',itemScoreStatus:'hidden'},{itemScoreId:4,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:5,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:1,itemTitle:'A2 个人卫生：员工着装规范、整洁，无留长指甲或涂指甲油、戴戒指、耳饰、穿高跟鞋等情况；工牌齐全',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'2分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'1分',itemScoreStatus:'hidden'},
                        {itemScoreId:3,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:2,itemTitle:'A3 人员意识：员工熟悉本班组工作标准，卫生意识到位，职责清晰',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'2分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'1分',itemScoreStatus:'hidden'},
                        {itemScoreId:3,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:3,itemTitle:'A4 物料管理：物料不得超保质期',smallItemStatus:'hidden',
             itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'4分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'3分',itemScoreStatus:'hidden'},
                        {itemScoreId:3,itemScoreTitle:'2分',itemScoreStatus:'hidden'},{itemScoreId:4,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:5,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]}
        ],
    },
    {
        id:1,
        bigItem:'办公室',
        bigItemStatus:'hidden',
        smallItem:[
            {itemId:0,itemTitle:'B1 培训：培训计划、培训记录规范及时；班组及时有效进行',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:1,itemTitle:'B2 设备管理-电脑、打印机使用正常，电脑有密码保护，设备安全使用',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:2,itemTitle:'B3 菜谱：严禁将禁用食品列入菜单；现场菜单为最新有效的；菜单保存期两年；晨检及时并建有记录；微信工作群菜品发布及时，经验审核及时',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:3,itemTitle:'B4 文件记录：归档记录分类存放，记录保存两年；文件记录便于查阅并保存完好',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:4,itemTitle:'B5 环境卫生：办公室各项物品定置存放，办公桌、地面等整洁、整齐',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]}
        ],
    },
    {
        id:2,
        bigItem:'仓库',
        bigItemStatus:'hidden',
        smallItem:[
            {itemId:0,itemTitle:'C1 人员能力：仓库熟悉系统及农残、索证索票等标准要求',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:1,itemTitle:'C2 设备管理：冷库/冰箱正常工作，温度正常；如有异常情况时，能够及时做好物料的保存',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:2,itemTitle:'C3 索证索票及检测：合格供方名录内容齐全；三证齐全有效，肉类检疫单齐全合格；农残检测和公示及时有效',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'2分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'1分',itemScoreStatus:'hidden'},
                        {itemScoreId:3,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:3,itemTitle:'C4 添加剂管理：添加剂专柜存放；添加剂专用出入库记录',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'2分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'1分',itemScoreStatus:'hidden'},
                        {itemScoreId:3,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:4,itemTitle:'C5 文件记录：出入库记录及时认真',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:5,itemTitle:'C7 环境卫生：货架、地面、墙面等整洁；标识完整无脱落',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]}
        ],
    },
    {
        id:3,
        bigItem:'粗加工、切配',
        bigItemStatus:'hidden',
        smallItem:[
            {itemId:0,itemTitle:'D1 设备管理：肉/海鲜/蔬菜加工刀、板、水池、盆等分类清晰；设备用后清洗干净；设备表面整洁无油污',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:1,itemTitle:'D2 加工制备：刀、板、筐、盒等无混用情况，无落地情况；解冻时用流水或冷藏',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:2,itemTitle:'D3 环境卫生：随干随清，地面无水；垃圾桶垃圾不得超过3/4，桶壁干净；抹布消毒到位，无异味',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:3,itemTitle:'D4 安全生产：切菜机、打馅机、切片机等设备防护措施齐全，严禁拆除或破坏；严禁用水冲设备',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'2分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'1分',itemScoreStatus:'hidden'},
                        {itemScoreId:3,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]}
        ],
    },
    {
        id:4,
        bigItem:'大灶',
        bigItemStatus:'hidden',
        smallItem:[
            {itemId:0,itemTitle:'E1 文件记录：食品品尝记录、班前测电笔记录、班后安检机录齐全及时',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:1,itemTitle:'E2 环境卫生： 大灶、烟罩日日清，表面无油污；地沟整洁；严禁使用钢丝球；烟道清洗有记录',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:2,itemTitle:'E3 安全生产：油炸食品必须使用油温报警器，专用油锅标识醒目；不用点火棒点火',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'4分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'3分',itemScoreStatus:'hidden'},
                        {itemScoreId:3,itemScoreTitle:'2分',itemScoreStatus:'hidden'},{itemScoreId:4,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:5,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]}
        ],
    },
    {
        id:5,
        bigItem:'面食',
        bigItemStatus:'hidden',
        smallItem:[
            {itemId:0,itemTitle:'F1 物料管理：冰箱、冷库内食品裸放及带外包装存放情况；生熟不得混放；标识齐全清晰',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:1,itemTitle:'E2 文件记录：添加剂使用记录、班前测电笔记录、班后安检机录齐全及时',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:2,itemTitle:'E3 加工制备：刀、板、筐、盒等无混用情况，无落地情况；解冻时用流水或冷藏',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:3,itemTitle:'B4 安全生产：压面机、和面机、打蛋机等设备防护措施齐全，严禁拆除或破坏；严禁用水冲设备',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'2分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'1分',itemScoreStatus:'hidden'},
                    {itemScoreId:3,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]}
        ],
    },
    {
        id:6,
        bigItem:'凉菜',
        bigItemStatus:'hidden',
        smallItem:[
            {itemId:0,itemTitle:'G1 个人卫生：员工着白大褂、口罩、一次性手套工作；手部有炎症及外伤不得工作；非专业人员禁止入内',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'0分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'不适用',itemScoreStatus:'hidden'}]},
            {itemId:1,itemTitle:'G2 文件记录：紫外线灯使用记录、冷拼控制记录、班前测电笔记录、班后安检机录齐全及时',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'0分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'不适用',itemScoreStatus:'hidden'}]},
            {itemId:2,itemTitle:'G3 冷荤管理：用于冷荤制作的物料，必须在使用前经过加热，严禁从冰箱取出的荤料直接加工',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'},
                        {itemScoreId:3,itemScoreTitle:'不适用',itemScoreStatus:'hidden'}]},
            {itemId:3,itemTitle:'G4 剩餐管理：剩餐在餐后一小时内处理，剩餐凉菜倒掉',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'},
                        {itemScoreId:3,itemScoreTitle:'不适用',itemScoreStatus:'hidden'}]},
            {itemId:4,itemTitle:'G5 环境卫生：随干随清，地面无水；抹布消毒到位，无异味',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'0分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'不适用',itemScoreStatus:'hidden'}]}
        ],
    },
    {
        id:7,
        bigItem:'售卖',
        bigItemStatus:'hidden',
        smallItem:[
            {itemId:0,itemTitle:'H1 服务过程：售卖准备过程采取措施，保证菜品温度',smallItemStatus:'hidden',
             itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:1,itemTitle:'H2 餐具保洁：餐具防护到位，夏季不超过12小时，冬季不超过24小时；擦拭托盘用专用的干净毛巾',smallItemStatus:'hidden',
             itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:2,itemTitle:'H3 环境卫生：地面无水；垃圾桶使用脚踏式',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]}
        ],
    },
    {
        id:8,
        bigItem:'前厅',
        bigItemStatus:'hidden',
        smallItem:[
            {itemId:0,itemTitle:'I1 文件记录：看板、记录等内容有效；看板、标识等无模糊、翘脚等现象',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:1,itemTitle:'I2 客户重点项：服务过程使用礼貌用语；遇到顾客投诉由专人规范处理',smallItemStatus:'hidden',
            itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]}
        ],
    },
    {
        id:9,
        bigItem:'洗消',
        bigItemStatus:'hidden',
        smallItem:[
            {itemId:0,itemTitle:'J1 文件记录：餐具消毒记录、班前测电笔记录、班后安检机录齐全及时',smallItemStatus:'hidden',
             itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:1,itemTitle:'J2 洗消：消毒、保洁符合文件规定；清洗消毒后的餐用具无油腻、异物、积水情况；严禁使用钢丝球',smallItemStatus:'hidden',
             itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:2,itemTitle:'J3 环境卫生：货架、保洁柜、地面整洁；员工穿防滑鞋或水鞋',smallItemStatus:'hidden',
             itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]}
        ],
    },
    {
        id:10,
        bigItem:'其他',
        bigItemStatus:'hidden',
        smallItem:[
            {itemId:0,itemTitle:'K1 环境卫生：厕所清理及时；通风良好，无异味',smallItemStatus:'hidden',
             itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'1分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:1,itemTitle:'K2 其他操作不当的问题：其他因现场操作原因导致的食品安全或生产安全隐患',smallItemStatus:'hidden',
             itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'2分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'1分',itemScoreStatus:'hidden'},
                        {itemScoreId:3,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]},
            {itemId:2,itemTitle:'K3 客户重点项：客户提出的问题点及改进项及时认真进行',smallItemStatus:'hidden',
             itemScore:[{itemScoreId:0,itemScoreTitle:'合格',itemScoreStatus:'show'},{itemScoreId:1,itemScoreTitle:'2分',itemScoreStatus:'hidden'},{itemScoreId:2,itemScoreTitle:'1分',itemScoreStatus:'hidden'},
                        {itemScoreId:3,itemScoreTitle:'0分',itemScoreStatus:'hidden'}]}
        ],
    },
];

export default class MainPage extends React.Component {
    constructor(props){
        super(props);
        this.state= {
            modelData:Model,
            url:require('../app/src/main/res/drawable/carat_d_black.png'),
            textRemarks:"",
            textSuggest:"",
            textManager:"",
        };

    }
    goBack(){
        alert('点击了返回');
    }
    goUpdate(){
        alert('点击了修改');
    }
    goChangeArrow(i){
        let modelData=this.state.modelData;
        if(modelData[i].bigItemStatus == 'hidden'){
            modelData[i].bigItemStatus = "show";
        }else{
            modelData[i].bigItemStatus = "hidden";
        }
        this.setState({
            modelData:modelData,
        });
    }
    goChangeScoreIndex(i,j,k){
        let modelData=this.state.modelData;
        if(k > 0){
            modelData[i].smallItem[j].smallItemStatus = "show";
        }else if(k == 0){
            modelData[i].smallItem[j].smallItemStatus = "hidden";
        }
        for(var a=0;a<modelData[i].smallItem[j].itemScore.length;a++){
            modelData[i].smallItem[j].itemScore[a].itemScoreStatus = "hidden";
        }
        modelData[i].smallItem[j].itemScore[k].itemScoreStatus = "show";
        this.setState({
            modelData:modelData,
        });
    }

    render() {
        let modelData=this.state.modelData;
        let url=this.state.url;
        let list=[],list2=[],list3=[];
        for(var i = 0; i < modelData.length; i++){
            list2=[];
            for(var j=0;j<modelData[i].smallItem.length;j++){
                list3=[];
                for(var k=0;k<modelData[i].smallItem[j].itemScore.length;k++){
                    let row3=(
                        <View key={k}>
                            {modelData[i].smallItem[j].itemScore[k].itemScoreStatus == 'show' ?
                            (<Text style={[styles.scoreStyle,{backgroundColor:'#2196F3'},{color:'white'}]} onPress={this.goChangeScoreIndex.bind(this,i,j,k)}>
                                            {modelData[i].smallItem[j].itemScore[k].itemScoreTitle}</Text>)
                            : (<Text style={styles.scoreStyle} onPress={this.goChangeScoreIndex.bind(this,i,j,k)}>{modelData[i].smallItem[j].itemScore[k].itemScoreTitle}</Text>)}
                        </View>
                    );
                    list3.push(row3);
                }
                let row2=(
                    <View key={j}>
                        <View style={styles.smallItemStyle}>
                            <Text style={{fontSize:16}}>{Model[i].smallItem[j].itemTitle}</Text>
                        </View>
                        <View style={{flexDirection:'row'}}>
                            {list3}
                        </View>
                        { modelData[i].smallItem[j].smallItemStatus == "show" ? <ImageUpload /> : null }
                    </View>
                );
                list2.push(row2);
            }
            let row=(
                <View key={i}>
                    { modelData[i].bigItemStatus == 'hidden' ?
                        <TouchableHighlight onPress={this.goChangeArrow.bind(this,i)} underlayColor='#DEDEDE'>
                            <View style={styles.bigItemStyle}>
                                <Text style={styles.infoText}>{Model[i].bigItem}</Text>
                                <Image style={styles.caratImage} source={url}/>
                            </View>
                        </TouchableHighlight>
                    :
                    <View>
                        <TouchableHighlight onPress={this.goChangeArrow.bind(this,i)} underlayColor='#DEDEDE'>
                            <View style={styles.bigItemStyle}>
                                <Text style={styles.infoText}>{Model[i].bigItem}</Text>
                                <Image style={styles.caratImage} source={require('../app/src/main/res/drawable/carat_u_black.png')}/>
                            </View>
                        </TouchableHighlight>
                        {list2}
                    </View>
                    }
                 </View>
            );
            list.push(row);
        }

        return (
            <View style={{flex:1}}>
                <View style={styles.titleBar}>
                    <TouchableWithoutFeedback onPress={this.goBack.bind(this)} >
                        <Image style={styles.imageBtn} source={require('../app/src/main/res/drawable/home_white.png')}/>
                    </TouchableWithoutFeedback>
                    <Text style={styles.titleBarText}>评估表</Text>
                    <TouchableWithoutFeedback onPress={this.goUpdate.bind(this)} >
                        <Image style={styles.imageBtn} source={require('../app/src/main/res/drawable/edit_white.png')}/>
                    </TouchableWithoutFeedback>
                </View>
                <ScrollView style={{marginLeft:5}}>
                    <Text style={{fontSize:30}}>健力源考核评估表(新)</Text>
                    <View style={styles.info}>
                        <Text style={styles.text1}>日期：</Text><Text style={styles.text2}>2017-04-05</Text><Text style={styles.text1}>地区：</Text><Text style={styles.text2}>北京-5区</Text>
                    </View>
                    <View style={styles.info}>
                        <Text style={styles.text1}>评估表：</Text><Text style={styles.text2}>体系考核表</Text><Text style={styles.text1}>餐厅编号：</Text><Text style={styles.text2}>JLY227</Text>
                    </View>
                    <View style={styles.info}>
                        <Text style={styles.text1}>餐厅名称：</Text><Text style={styles.text2}>北京燃气集团</Text><Text style={styles.text1}>营运督导：</Text><Text style={styles.text2}>乔洪轩</Text>
                    </View>
                    <View style={styles.info}>
                        <Text style={styles.text1}>餐厅经理：</Text><Text style={styles.text2}></Text>
                    </View>
                    <TextInput
                        style={styles.textInput}
                        multiline={true}
                        numberOfLines={1}
                        onChangeText={(textManager) => this.setState({textManager})}
                        value={this.state.textManager}
                    />
                    {list}
                    <Text style={styles.beiZhu}>备注：</Text>
                    <TextInput
                        style={styles.textInput}
                        multiline={true}
                        numberOfLines={3}
                        onChangeText={(textRemarks) => this.setState({textRemarks})}
                        value={this.state.textRemarks}
                    />
                    <View style={styles.line}/>
                    <Text style={{marginBottom:10}}>如果做出如下改变,餐厅将更完美:</Text>
                    <TextInput
                        style={styles.textInput}
                        multiline={true}
                        numberOfLines={3}
                        onChangeText={(textSuggest) => this.setState({textSuggest})}
                        value={this.state.textSuggest}
                    />
                </ScrollView>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    titleBar:{
        height:50,
        flexDirection:'row',
        backgroundColor:'#2196F3',
        justifyContent: 'space-between',
    },
    titleBarText:{
        fontSize:20,
        color:'white',
        textAlign:'center',
        marginTop:12,
    },
    imageBtn: {
        width:20,
        height: 20,
        marginLeft:20,
        marginRight: 20,
        marginTop: 12,
    },
    line:{
        borderColor:'gray',
        borderWidth:0.5,
        borderStyle:'solid',
        margin:8,
    },
    info:{
        marginTop:10,
        flexDirection:'row',
        justifyContent: 'flex-start',
    },
    text1:{
        fontSize:16,
        width:90,
    },
    text2:{
        fontSize:16,
        width:110,
    },
    imageStyle:{
        width:50,
        height:50,
    },
    infoText:{
        height:30,
        fontSize:18,
        marginLeft:10,
        marginTop:10,
    },
    bigItemStyle:{
        marginTop:5,
        marginBottom:5,
        flexDirection:'row',
        justifyContent:'space-between',
    },
    smallItemStyle:{
        borderWidth:0.5,
        borderColor:'gray',
        backgroundColor:'#EEF7EA',
        marginTop:10,
        marginBottom:5,
        marginRight:5,
    },
    caratImage:{
        marginTop:13,
        marginRight:10,
    },
    scoreStyle:{
        borderWidth:0.5,
        borderColor:'gray',
        width:50,
        height:30,
        textAlign:'center',
        paddingTop:5,
    },
    beiZhu:{
        fontSize:14,
        margin:10,
    },
    textInput:{
        marginLeft:5,
        marginRight:5,
    },
});

